//
//  UIView+MSPlacehodlerView.h
//  PeopleForTheFirstMall
//
//  Created by iOS on 2019/8/9.
//  Copyright © 2019 MS. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSUInteger, MSPlacehodlerViewStatus) {
    MSPlacehodlerViewStatusNoNetwork,       ///< 网络不给力，请稍后重试
    MSPlacehodlerViewStatusNoData,          ///< 暂无数据
    MSPlacehodlerViewStatus404,             ///< 抱歉，页面找不到了
    MSPlacehodlerViewStatusInDevelopment,   ///< 系统开发中~
};

NS_ASSUME_NONNULL_BEGIN

@interface UIView (MSPlacehodlerView)

/**
 show 占位图 可定制frame

 @param status 状态
 @param frame 占位图frame，CGRectZero时取self.bounds
 @param description 描述
 */
- (void)showPlaceholderViewWithStatus:(MSPlacehodlerViewStatus)status
                                frame:(CGRect)frame
                          description:(nonnull NSString *)description;
/**
 show 占位图

 @param status 状态
 @param description 描述
 */
- (void)showPlaceholderViewWithStatus:(MSPlacehodlerViewStatus)status
                          description:(nonnull NSString *)description;

- (void)hiddenPlaceholderView;

@end

@interface MSPlacehodlerView : UIView

@property (nonatomic, copy) NSString    *placeholderImg;
@property (nonatomic, copy) NSString    *text;

@end

NS_ASSUME_NONNULL_END
